CTM 2.0 BTCUSD 8h Parameter Search

Created on: 10 August 2022, Last updated on: 10 August 2022
Home
  • Designed for desktop by Roman.
  • This document attempts to perform 2 parameters optimization on 8h BTCUSD. These are 'Fast' and 'Slow' moving averages.
  • It uses Andrew's Python Backtester Example (version from 1-Aug-2022). Thank you, Andrew, for great contribution :-)
  • Such optimisation is CPU and RAM intense process. Therefore, it has been decided to perform larger parameter value steps (e.g. 6).
  • Then, re-running the optimisation with step value = 1 only for darker regions (best Romad values).
  • Click on the button to toggle between showing and hiding content.
  • Zoom-in as desired. Then refresh for crispiness (might need to click the button again to expand).

BTC Parameter Tuning by Romad Value

Chart below provides heatmap of Romad values.

Analysing Romad value on all-time data since 2015, the regions surrounding the following values performed particularly well:

Fast Slow Romad
24 154 12.21
22 71 12.18
24 265 11.08
21 443 9.19
148 255 8.18
148 417 7.97
148 378 7.11

That suggests 22 or 148 could be a good choice for the slow SMA.

Details can be explored using 'Romad Zoming-in' button below.


It might be worth splitting data into smaller 'buckets' and backtesting the strategy individually on each bucket rather than on the entire 7-year period. And then calculating an average value for each combination of parameters.

This method does exactly that. Bucket sizes were decided to be 1 year-long periods of time, where each bucket is overlapping by 6 months. One year period is hopefully long enough not to disadvantage higher values of MVAs as they require more bars to obtain the first value (this is partially also achieved by overlapping). Following are the buckets periods:

  • 2015/7 - 2016/6
  • 2016/1 - 2016/12
  • 2016/7 - 2017/6
  • 2017/1 - 2017/12
  • 2017/7 - 2018/6
  • 2018/1 - 2018/12
  • 2018/7 - 2019/6
  • 2019/1 - 2019/12
  • 2019/7 - 2020/6
  • 2020/1 - 2020/12
  • 2020/7 - 2021/6
  • 2021/1 - 2021/12
  • 2021/7 - 2022/6

Chart below allows examination of more detailed data from the darker left bottom region of the above chart.

Not sure if averaging the buckets provides a more statistically significant result, however, the below values are surrounded by best-performing parameter regions according to this type of data:

Fast Slow Romad
15 60 0.0951
15 76 0.0950
15 67 0.0940

That suggests 15 could be a good choice for the slow SMA.

15 60 appears to be the best performing parameter settings from this perspective.

Details can be explored using 'Individual Buckets Results' button below. It is interesting to see how the performance changes across individual time buckets.


BTC Parameter Tuning by 'Total Return' Value

To be continued...

Home